const koaStatic = require('koa-static'); // 引入静态资源映射中间件
module.exports = (app) => {
  const {
    config,
    env
  } = app;
  app.use(koaStatic(`${config.root}/dist`, Object.assign({}, config.static && config.static.options)));

  // 设置静态目录
  if(app.env !== 'product') {
    app.use(koaStatic(`${config.root}/doc`, {}));
  }
};
